console.log(`修改领取状态`);
let body = $response.body;
body =  JSON.parse(body);

function get_date_str(sec_diff) {
var currentDate = new Date();
console.log(currentDate); 
currentDate.setSeconds(currentDate.getSeconds() + sec_diff);
var year = currentDate.getFullYear();
var month = ("0" + (currentDate.getMonth() + 1)).slice(-2);
var day = ("0" + currentDate.getDate()).slice(-2);
var hours = ("0" + currentDate.getHours()).slice(-2);
var minutes = ("0" + currentDate.getMinutes()).slice(-2);
var seconds = ("0" + currentDate.getSeconds()).slice(-2);

return year + "-" + month + "-" + day + " " + hours + ":" + minutes + ":" + seconds + ".000";
}
var nextTime= get_date_str(3);
//let nextTime="2023-12-06 09:59:50.000";

if (body.result.displayCode){
    console.log(`${JSON.stringify(body.result)}`);
    // body.result.displayCode = 11;
    // body.result.displayMessage = "活动已开始";    
    body.result.nextPeriodStartTime = nextTime;       
}
if (body.data.displayCode){
    console.log(`${JSON.stringify(body.data)}`);
    // body.data.displayCode = 11;
    // body.data.displayMessage = "活动已开始";  
    body.data.nextPeriodStartTime = nextTime;        
}
body =  JSON.stringify(body);
$done({ body })